package com.demo.petshop.controller;


import com.demo.petshop.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/search")
public class SearchController {

    @Autowired
    private SearchService searchService;

    @GetMapping("searchByKeyword")
    public Object searchByKeyword(String keyword){
        return searchService.searchByKeyword(keyword);
    }

    @GetMapping("recommend")
    public Object recommend(){
        return searchService.recommend();
    }
}
